/**
 * Copyright &copy; 2017 <a href="https://gitee.com/hackempire/emsite-parent">emsite</a> All rights reserved.
 */
package com.empire.emsite.modules.cms.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.empire.emsite.common.persistence.DataEntity;
import com.empire.emsite.modules.sys.entity.User;

/**
 * 类Comment.java的实现描述：评论Entity
 * 
 * @author arron 2017年10月30日 下午12:52:09
 */
public class Comment extends DataEntity<Comment> {

    private static final long serialVersionUID = 1L;
    private Category          category;             // 分类编号
    private String            contentId;            // 归属分类内容的编号（Article.id、Photo.id、Download.id）
    private String            title;                // 归属分类内容的标题（Article.title、Photo.title、Download.title）
    private String            content;              // 评论内容
    private String            name;                 // 评论姓名
    private String            ip;                   // 评论IP
    //private Date              createDate;           // 评论时间
    private User              auditUser;            // 审核人
    private Date              auditDate;            // 审核时间

    //private String            delFlag;              // 删除标记删除标记（0：正常；1：删除；2：审核）

    public Comment() {
        super();
        this.delFlag = DEL_FLAG_AUDIT;
    }

    public Comment(String id) {
        this();
        this.id = id;
    }

    public Comment(Category category) {
        this();
        this.category = category;
    }

    @NotNull
    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    @NotNull
    public String getContentId() {
        return contentId;
    }

    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    @Length(min = 1, max = 255)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Length(min = 1, max = 255)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Length(min = 1, max = 100)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User getAuditUser() {
        return auditUser;
    }

    public void setAuditUser(User auditUser) {
        this.auditUser = auditUser;
    }

    public Date getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(Date auditDate) {
        this.auditDate = auditDate;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Override
    @NotNull
    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    @Length(min = 1, max = 1)
    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

}
